//
//  UrlImageButton.h
//  test image
//
//  Created by Xuyan Yang on 8/06/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SDWebImageCompat.h"
#import "SDWebImageManagerDelegate.h"
@protocol ImageSucessDelegate2 <NSObject>

-(void)ImageSucessDelegateWithImage2:(UIImage *)image withImageView:(UIImageView *)imageView;

@end
@interface UrlImageView : UIImageView <SDWebImageManagerDelegate> {	
	NSInteger iconIndex;

	CGSize scaleSize;
	BOOL    isScale;

	BOOL    _animated;
    id <ImageSucessDelegate2> _delegate;
}
@property (nonatomic, retain) id <ImageSucessDelegate2> delegate;

@property (nonatomic, assign) BOOL    _animated;
@property (nonatomic, assign) NSInteger iconIndex;
@property (nonatomic, assign) int selftag;
@property (nonatomic, retain) UIImage *imageview;

- (void) setImageFromUrl:(BOOL) animated withUrl:(NSString *)iconUrl;

- (void)setImageWithURL:(NSURL *)url;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
- (void)cancelCurrentImageLoad;


-(void)scaleToSize:(CGSize)size ;
@end
